package com.sinodata.bsm.common.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Event entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EVENT")
public class Event implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -7433525908162726725L;

    // Fields  
    private Long id;
    private Integer catalog;
    private Long resId;
    private Long eventTypeId;
    private String msg;
    private Integer level;
    private Date occurTime;
    private Integer status;
    private String ackUser;
    private Date ackTime;
    private Integer confirmType;
    private String confirmer;
    private Date confirmTime;
    private String msgExpr;
    private Integer count;
    private Date lastOccurTime;
    private String ruleExpr;
    private Long filterEventId;
    private String objectId;

    // Constructors

    /** default constructor */
    public Event() {
    }

    /** minimal constructor */
    public Event(Long id) {
        this.id = id;
    }

    /** full constructor */
    public Event(Long id, Integer catalog, Long resId, Long eventTypeId, String msg, Integer level, Date occurTime, Integer status, String ackUser, Date ackTime, Integer confirmType, String confirmer, Date confirmTime, String msgExpr, Integer count, Date lastOccurTime, String ruleExpr, Long filterEventId) {
        this.id = id;
        this.catalog = catalog;
        this.resId = resId;
        this.eventTypeId = eventTypeId;
        this.msg = msg;
        this.level = level;
        this.occurTime = occurTime;
        this.status = status;
        this.ackUser = ackUser;
        this.ackTime = ackTime;
        this.confirmType = confirmType;
        this.confirmer = confirmer;
        this.confirmTime = confirmTime;
        this.msgExpr = msgExpr;
        this.count = count;
        this.lastOccurTime = lastOccurTime;
        this.ruleExpr = ruleExpr;
        this.filterEventId = filterEventId;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "EVENT_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "CATALOG", precision = 18, scale = 0)
    public Integer getCatalog() {
        return this.catalog;
    }

    public void setCatalog(Integer catalog) {
        this.catalog = catalog;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "EVENT_TYPE_ID", precision = 18, scale = 0)
    public Long getEventTypeId() {
        return this.eventTypeId;
    }

    public void setEventTypeId(Long eventTypeId) {
        this.eventTypeId = eventTypeId;
    }

    @Column(name = "MSG", length = 3072)
    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Column(name = "LEVEL_", precision = 1, scale = 0)
    public Integer getLevel() {
        return this.level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Column(name = "OCCUR_TIME", length = 7)
    public Date getOccurTime() {
        return this.occurTime;
    }

    public void setOccurTime(Date occurTime) {
        this.occurTime = occurTime;
    }

    @Column(name = "STATUS", precision = 1, scale = 0)
    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Column(name = "ACK_USER", length = 128)
    public String getAckUser() {
        return this.ackUser;
    }

    public void setAckUser(String ackUser) {
        this.ackUser = ackUser;
    }

    @Column(name = "ACK_TIME", length = 7)
    public Date getAckTime() {
        return this.ackTime;
    }

    public void setAckTime(Date ackTime) {
        this.ackTime = ackTime;
    }

    @Column(name = "CONFIRM_TYPE", precision = 1, scale = 0)
    public Integer getConfirmType() {
        return this.confirmType;
    }

    public void setConfirmType(Integer confirmType) {
        this.confirmType = confirmType;
    }

    @Column(name = "CONFIRMER", length = 128)
    public String getConfirmer() {
        return this.confirmer;
    }

    public void setConfirmer(String confirmer) {
        this.confirmer = confirmer;
    }

    @Column(name = "CONFIRM_TIME", length = 7)
    public Date getConfirmTime() {
        return this.confirmTime;
    }

    public void setConfirmTime(Date confirmTime) {
        this.confirmTime = confirmTime;
    }

    @Column(name = "MSG_EXPR", length = 1024)
    public String getMsgExpr() {
        return this.msgExpr;
    }

    public void setMsgExpr(String msgExpr) {
        this.msgExpr = msgExpr;
    }

    @Column(name = "COUNT", precision = 9, scale = 0)
    public Integer getCount() {
        return this.count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    @Column(name = "LAST_OCCUR_TIME", length = 7)
    public Date getLastOccurTime() {
        return this.lastOccurTime;
    }

    public void setLastOccurTime(Date lastOccurTime) {
        this.lastOccurTime = lastOccurTime;
    }

    @Column(name = "RULE_EXPR", length = 1024)
    public String getRuleExpr() {
        return this.ruleExpr;
    }

    public void setRuleExpr(String ruleExpr) {
        this.ruleExpr = ruleExpr;
    }

    @Column(name = "FILTER_EVENT_ID", precision = 18, scale = 0)
    public Long getFilterEventId() {
        return filterEventId;
    }

    public void setFilterEventId(Long filterEventId) {
        this.filterEventId = filterEventId;
    }

    @Column(name = "OBJECT_ID", length = 128)
    public String getObjectId() {
        return this.objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    @Override
    public String toString() {
        return "Event [id=" + id + ", catalog=" + catalog + ", resId=" + resId + ", eventTypeId=" + eventTypeId + ", msg=" + msg + ", level=" + level + ", occurTime=" + occurTime + ", status=" + status + ", ackUser=" + ackUser + ", ackTime=" + ackTime + ", confirmType=" + confirmType + ", confirmer=" + confirmer + ", confirmTime=" + confirmTime + ", msgExpr=" + msgExpr + ", count=" + count + ", lastOccurTime=" + lastOccurTime + ", ruleExpr=" + ruleExpr + ", filterEventId=" + filterEventId + ", objectId=" + objectId + "]";
    }

}